<?php
session_start();
require_once(ABSPATH . 'wp-admin/includes/user.php');
require_once(ABSPATH . WPINC . '/registration.php');
require_once dirname( __FILE__ ) . '/functions-clientuser.php';
?>
<!-- hearder -->
<?php get_header(); ?>
<div id="content">
	<div class="left">
		<!-- search -->            
	       <?php include ('searchform.php'); ?> 
			<div  class="tabcontainer" >				
			<? if (have_posts()):?>
				<? while(have_posts()):?>
    			<? the_post()?>
				
				<div class="question">
        		<div class="question-title">			 
				
            		<div class="question-user-img">
					<?php
                			$link_avatar = 'wp-content/uploads/'.get_usermeta($post->post_author, 'avatar');
                			 
                			if($link_avatar == '')
                				$link_avatar = get_bloginfo('template_directory')."/images/no_avatar.gif";
                		?>
                		<img alt="No image" src="<?php echo $link_avatar;?>" height="32" width="32"/>
                		
                	</div>
                	<div class="question-by">
                		<p><?php the_author_posts_link();?></p>
                    	<p class="question-h1"><a href='<?=the_permalink()?>'><?=the_title()?></a></p>
                	</div>
                			<div style="clear:both;"></div>
				
            	</div>
            <div class="question-bottom">
            	<div class="answer">
                	<a href=<?php comment_link()?>>Answer this question</a>
                	
                </div>
                <div class="answers">                
                	<p><font class="answer-nr"><a href=<?php comment_link();?>><?php comments_number("No Answer", "1 Answer", "% Answers");?> </a></font></p>					
                </div>
                <div class="answer-date">
                	<p><?php the_time(get_option('date_format'));?></p>
                </div>
                <div class="tags">                	
                	<?php  if(get_the_tags()):?>                     	
                    	<?php $j++;?>
                    	
                   <table>
                   	<tr>
                   		<td><ul id="board_carusel_nav">
						<li><a href="javascript:stepcarousel.stepBy('board_carusel', -1)">&laquo;</a><a href="javascript:stepcarousel.stepBy('board_carusel', 1)">&raquo;</a></li>
						</ul>	
						</td>                   		
                   		<td>
                   		<div id="board">
						<div id="board_items">
							<div id="board_body">	
								<div id="board_carusel" style="width:200px;height:30px;position:relative;">
									<div class="belt" style="position: absolute;left: 0;top: 0;">      								       							
		       							
		       							<div class="board_item">			
											<p><strong>											                    	
                    							<?php the_tags('', ', ', '');?>                        	                  
                   							 </strong></p>								
										</div>									
										
									</div>
								</div>
							</div>
			
						</div>
						</div>
                   		</td>
                   	</tr>
                   
                   </table>                    					
							                    
                    <?endif;?>
                </div>
			</div>
         </div>		                 
    			   	
			<?endwhile;?>			
			
		<?endif;?>   
		<div class="wp-pagenavi">		
		<p>
			<?php 
				get_pagination();
			?>
		</p>
	</div>
			</div><!-- close tabcontainer  -->
    </div>
	<!-- sidebar -->
	<?php get_sidebar(); ?>
</div>      
<!-- footer -->	    
<?php get_footer(); ?>		


   